package com.leco.demo.spring;

import com.leco.demo.spring.beans.Bean1;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author greg
 * @version 2022/10/20
 **/
public class SpringDemo {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Bean1 bean1 = (Bean1) context.getBean("bean1");
        System.out.println(bean1);
    }
}
